<?php

namespace app\models;

use Yii;

/**
 * This is the model class for table "{{%pk_goods}}".
 *
 * @property int $id
 * @property string $name 商品名
 * @property int $group_id 组ID
 */
class PkGoods extends \yii\db\ActiveRecord
{
    /**
     * {@inheritdoc}
     */
    public static function tableName()
    {
        return '{{%pk_goods}}';
    }

    /**
     * {@inheritdoc}
     */
    public function rules()
    {
        return [
            [['group_id'], 'integer'],
            [['name'], 'string', 'max' => 30],
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'name' => '商品名',
            'group_id' => '组ID',
        ];
    }
}
